﻿using Inovout.Cloud.Models;
using Inovout.Services;
using NHibernate.Criterion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Cloud.Services
{
    public class ProductService : RepositoryService<Product>, IProductService
    {
        public Product FindByNameAndAssemblyName(string name, string assemblyName)
        {
            Product project = base.Repository.Find(
                new ICriterion[]{  
                 Restrictions.Eq("Name", name),
                Restrictions.Eq("AssemblyName", assemblyName)
                });
            return project;
        }
    }
}
